#ifndef CAPTIONTIPS_H
#define CAPTIONTIPS_H
#include <QObject>
#include <QWidget>
#include <QLabel>
#include <QTimer>

class CaptionTips : public QLabel
{
    Q_OBJECT

public:
    CaptionTips(QWidget* parent );
    ~CaptionTips();
    void AppendContext(QString strContext, int iSpeed = 4);

private:
    void PlayContext();
    void NextContext();
    void StopContext();
    QTimer* _timer_updateContext;
    int _index;
    const int _width;
    const int _iInterval;
    int _iSpeed;
    QStringList _strContextList;

protected:
    void paintEvent(QPaintEvent* event);
};

#endif // CAPTIONTIPS_H
